
const path = require('path')
const webpack = require('webpack')
const htmlWpackPlugin = require('html-webpack-plugin')

module.exports={
    
    entry: path.join(__dirname,'./src/main.js'),
    output:{
        path: path.join(__dirname,'./dist'),
        filename:'bundle.js'
    },
    plugins:[
        new webpack.HotModuleReplacementPlugin(),
        new htmlWpackPlugin({
            template:path.join(__dirname,'./src/index.html'),
            filename:'index.html'
        }),
        // ["import", { libraryName: "antd-mobile", style: "css" }] 
    ],
    module:{
        rules:[
            {test: /\.css$/,use:['style-loader','css-loader']} ,
            { test: /\.scss$/, use: ['style-loader', 'css-loader?modules', 'sass-loader'] },
            {test: /\.(png|gif|jpg)$/,use:'url-loader'} ,
            {test: /\.jsx?$/,use:'babel-loader',exclude: /node_modules/} ,
            {test: /\.(jsx|js)$/,use:'babel-loader',exclude: /node_modules/} ,
            
        ]
    },
    mode:'development',

    

}